package cn.itheima.web.servlet;

import java.io.IOException;

/**
 * Created by Administrator on 2018/6/23 0023.
 */
public class HelloServlet extends javax.servlet.http.HttpServlet {
    protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException {
        System.out.println("hello servlet...");
        response.setContentType("text/html;charset=utf-8");
        response.getWriter().write("你好servlet");
    }

    protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException {
        this.doPost(request,response);
    }
}
